<template>
  <div>
    <h1>props练习</h1>
    <Pagination :currentPage="currentPage" :total="total" :limit="limit" :limitList="limitList" :changeCurrentPage="changeCurrentPage" :changeLimit="changeLimit">
    </Pagination>
  </div>
</template>

<script>
import Pagination from '@/components/Pagination'
// 创建并暴漏组件
export default {
  name: 'App',
  components: {
    Pagination
  },
  data() {
    return {
      currentPage: 1,
      total: 7,
      limit: 3,
      limitList: [3, 5, 7, 9]
    }
  },
  methods: {
    changeCurrentPage(newPage) {
      this.currentPage = newPage
    },
    changeLimit(value) {
      this.limit = value
    }
  }
}
</script>

<style>
</style>